import Vue from 'vue'
import Router from 'vue-router'
import element_test from '@/components/element_test'
// import HelloWorld from '@/components/HelloWorld'   //测试
import index from '@/components/index'    // 首页
import footer from '@/components/footer'  // 父组件  底边
import header from '@/components/header'  // 父组件  左边框
import login from '@/components/login'    //  登录
import register from '@/components/register'    // 注册
import activate from '@/components/activate'    // 账号激活 发qq邮件
import save_cookie from '@/components/save_cookie'    // 存cookie
import cate from '@/components/cate'    //  展示分类
import cart from '@/components/cart'    // 展示购物车
import product from '@/components/product'    //  展示产品
import search from '@/components/search'    // 搜索
import search_data from '@/components/search_data'    //  避免搜索数据外露在路由 中转
// import checkout from '@/components/checkout'    // 订单测试
import order_from from '@/components/order_from'    //订单页
import tuwen from '@/components/tuwen'    //评论富文本
import kefu from '@/components/kefu'    // 客服聊天
import skillgoods from '@/components/skillgoods'    //秒杀页

Vue.use(Router)


var routes = [
  {
    path: '/',
    name: 'index',
    component: index
  },
  {
    path: '/cart',
    name: 'cart',
    component: cart
  },
  {
    path: '/skillgoods',
    name: 'skillgoods',
    component: skillgoods
  },
  {
    path: '/tuwen',
    name: 'tuwen',
    component: tuwen
  },
  {
    path: '/order_from',
    name: 'order_from',
    component: order_from
  },
  {
    path: '/checkout',
    name: 'checkout',
    component: checkout
  },
  {
    path: '/search',
    name: 'search',
    component: search
  },
  {
    path: '/search_data',
    name: 'search_data',
    component: search_data
  },
  {
    path: '/element_test',
    name: 'element_test',
    component: element_test
  },
  {
    path: '/save_cookie',
    name: 'save_cookie',
    component: save_cookie
  },
  {
    path: '/login',
    name: 'login',
    component: login
  },
  {
    path: '/footer',
    name: 'footer',
    component: footer
  },
  {
    path: '/kefu',
    name: 'kefu',
    component: kefu
  },
  {
    path: '/header',
    name: 'header',
    component: header
  },
  {
    path: '/register',
    name: 'register',
    component: register
  },
  {
    path: '/activate',
    name: 'activate',
    component: activate
  },
  {
    path: '/cate',
    name: 'cate',
    component: cate
  },
  {
    path: '/product',
    name: 'product',
    component: product
  }
]


export default new Router({
  routes: routes,
  mode:'history' /*history*/  /*hash*/
})
